﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Description;
using CredisysTriunfadores.BusinessLogic.Prestamos.Interfaz;
using CredisysTriunfadores.BusinessEntites.Prestamos;
using Microsoft.Practices.Unity;

namespace CredisysTriunfadores.Api.Controllers
{
    public class PrestamosController : ApiController
    {
        [Dependency]
        public IPrestamoBL prestamoBL { get; set; }

        public IEnumerable<Prestamo> Get() {

            return prestamoBL.GetAllPrestamos();
        }


        public IEnumerable<Prestamo> Get(string criterio) {
            return prestamoBL.GetAllPrestamosByCriterio(criterio);
        }

    }
}
